<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<title>个人资料</title>
	<link rel="stylesheet" href="css/information/amazeui.min.css">
	<link rel="stylesheet" href="css/information/amazeui.cropper.css">
	<link rel="stylesheet" href="css/information/custom_up_img.css">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/public.css" media="all" />
	<style>
		.ggg{
			margin-top: 100px;
		}
	</style>
</head>
<!-- 顶部导航 -->
<%@ include file="header.jsp"%>
<!-- 顶部导航结束 -->

<body class="childrenBody">
<div class="ggg">
<form class="layui-form layui-row">
	<div class="layui-col-md3 layui-col-xs12 user_right">
		<div class="layui-upload-list">
			<img src="${LoginUser.picture}" class="layui-upload-img layui-circle userFaceBtn userAvatar" id="userFace">
		</div>
	</div>
	<div class="layui-col-md6 layui-col-xs12">
		<div class="layui-form-item">
			<label class="layui-form-label">用户名</label>
			<div class="layui-input-block">
				<input type="text" value="${LoginUser.getPunsterName()}" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">用户组</label>
			<div class="layui-input-block">
				<input type="text" value="会员" disabled class="layui-input layui-disabled">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">昵称</label>
			<div class="layui-input-block">
				<input type="text" value="${LoginUser.getNickName()}" placeholder="请输入昵称" lay-verify="required" class="layui-input realName">
			</div>
		</div>
		<div class="layui-form-item" pane="">
			<label class="layui-form-label">性别</label>
			<div class="layui-input-block userSex">
				<input type="radio" name="sex" value="男" title="男">
				<input type="radio" name="sex" value="女" title="女">
				<input type="radio" name="sex" value="保密" title="保密">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label" style="width:auto">出生年月</label>
			<div class="layui-input-block">
				<input type="text" value="${LoginUser.getBirthday()}" placeholder="请输入出生年月" lay-verify="userBirthday" readonly class="layui-input userBirthday">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">邮箱</label>
			<div class="layui-input-block">
				<input type="text" value="${LoginUser.getEmail()}" placeholder="请输入邮箱" lay-verify="email" class="layui-input userEmail">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label" style="width:auto">自我评价</label>
			<div class="layui-input-block">
				<textarea value="${LoginUser.getMyEvaluation()}" placeholder="请输入内容" class="layui-textarea myself"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="changeUser">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</div>
</form>

	<!--图片上传框-->
	<div class="am-modal am-modal-no-btn up-frame-bj " tabindex="-1" id="doc-modal-1">
		<div class="am-modal-dialog up-frame-parent up-frame-radius">
			<div class="am-modal-hd up-frame-header">
				<label>修改头像</label>
				<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
			</div>
			<div class="am-modal-bd  up-frame-body">
				<div class="am-g am-fl">
					<div class="am-form-group am-form-file">
						<div class="am-fl">
							<button type="button" class="am-btn am-btn-default am-btn-sm">
								<i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
						</div>
						<input type="file" id="inputImage">
					</div>
				</div>
				<div class="am-g am-fl" >
					<div class="up-pre-before up-frame-radius">
						<img alt="" src="" id="image" >
					</div>
					<div class="up-pre-after up-frame-radius">
					</div>
				</div>
				<div class="am-g am-fl">
					<div class="up-control-btns">
						<span class="am-icon-rotate-left"  onclick="rotateimgleft()"></span>
						<span class="am-icon-rotate-right" onClick="rotateimgright()"></span>
						<span class="am-icon-check" id="up-btn-ok" url="/admin/user/upload.action"></span>
					</div>
				</div>

			</div>
		</div>
	</div>
	<!--加载框-->
	<div class="am-modal am-modal-loading am-modal-no-btn" tabindex="-1" id="my-modal-loading">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">正在上传...</div>
			<div class="am-modal-bd">
				<span class="am-icon-spinner am-icon-spin"></span>
			</div>
		</div>
	</div>

	<!--警告框-->
	<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
		<div class="am-modal-dialog">
			<div class="am-modal-hd">信息</div>
			<div class="am-modal-bd"  id="alert_content">
				上传成功
			</div>
			<div class="am-modal-footer">
				<span class="am-modal-btn">确定</span>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="../../layui/layui.js"></script>
<script type="text/javascript" src="../../js/userInfo.js"></script>
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/information/amazeui.min.js" charset="utf-8"></script>
<script src="js/information/cropper.min.js" charset="utf-8"></script>
<script src="js/information/custom_up_img.js" charset="utf-8"></script>
	<script>
        var userId = ${LoginUser.getUserId()};
		var sex = "${LoginUser.getSex()}";
		if (sex == "" || sex == null || sex == undefined){
			$(".layui-form").find("input[type='radio']").eq(2).attr("checked","");
		} else if (sex == '男'){
            $(".layui-form").find("input[type='radio']").eq(0).attr("checked","");
		} else {
            $(".layui-form").find("input[type='radio']").eq(1).attr("checked","");
		}
	</script>
</body>
</html>